<template>
	<view class="container bg-f9f9f9">
		<!-- <u-navbar leftIconSize="40" placeholder titleStyle="font-size:36rpx;font-weight:600;" title="创作者中心" bgColor="#ffffff" :autoBack="true"></u-navbar> -->
		<view class="pdy-48 pdx-28 flex jc_between ai_center">
			<view class="text-b text-32">收益：{{userInfo.income}}</view>
			<view class="flex ai_center">
				<view class="w-128 h-54 radio-30 text-center btn1" @click="jump('/pages/cash/cash')">提现</view>
				<view class="w-128 h-54 radio-30 text-center btn2" @click="jump('/pages/record/record')">明细</view>
			</view>
		</view>
		<view class="radio-t-40 bg-white pdt-40">
			<view class="flex fw_wrap jc_between pdx-56" v-if="list.length">
				<view class="w-304 radio-20 mgb-24" v-for="item in list">
					<view class="w h-400 ov-hide radio-t-20 p-rel">
						<image class="w h bg-ccc" :src="item.cover"></image>
						<view class="bg-000-04 p-abs top-0 left-0 w h text-white text-32 flex ai_center jc_center" v-if="item.status==0">审核中...</view>
					</view>
					<view class="border-9A9A9A pdy-22 pdx-18 radio-b-20 text-24 text-ellipsis">{{item.title}}</view>
				</view>
			</view>
			<view v-else class="flex fd_c ai_center jc_center">
				<image class="w-210 h-165" src="/static/image/noData.png"></image>
				暂未发布工作流
			</view>
		</view>
		<view class="footer bg-white">
			<view class="footer-fixed flex">
				<view class="footer-btn flex1" @click="jump('/pages/release/release')">前往发布</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{},
				list:[],
				userInfo:{}
			}
		},
		onLoad() {
			this.getInfo()
			this.getUserInfo()
		},
		methods: {
			getUserInfo(){
				this.get('user/index').then(res=>{
					this.userInfo = res.data.user
				})
			},
			getInfo(){
				this.get('workflow/index').then(res=>{
					this.info = res.data
					this.list = res.data.list.data
				})
			},
			jump(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.w-210{
		width:210rpx;
	}
	.h-165{
		height: 165rpx;
	}
.bg-f9f9f9{
	background-color: #f9f9f9;
}
.footer{
	height: 114rpx;
	.footer-fixed{
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		padding:6rpx 30rpx 20rpx;
	}
	&-btn{
		height: 88rpx;
		background-image: linear-gradient(270deg,#17FEE9,#94FDC4);
		border-radius: 44rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 32rpx;
	}
	&-btn2{
		height: 88rpx;
		background-color: #F3F3F3;
		line-height: 88rpx;
		text-align: center;
		border-radius: 44rpx;
		color:#9A9A9A;
		width: 266rpx;
		margin-right: 20rpx;
		font-size: 32rpx;
	}
}
.btn1{
	background: linear-gradient(270deg, #21FFE7 0%, #88FEC8 100%);
	color: #215139;
	line-height:54rpx;
	font-size: 24rpx;
}
.btn2{
	border:1px solid #333333;
	color: #333333;
	line-height:50rpx;
	font-size: 24rpx;
	margin-left: 8rpx;
}
.border-9A9A9A{
	border: 1px solid #9A9A9A;
	border-top:none;
}
</style>
